#include "File.h"

#include <string.h>
#include <fan-llvm/core/Core.h>
#include "Type.h"
#include "UnsupportedErr.h"


Type* File_classType = NULL;
VTable* File_classVTable = NULL;


/**********************************************
 *
 * Methods and fields
 *
 **********************************************/


/* Void makeNew(Uri uri) */
void File_makeNew(File* self, Uri* uri)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.makeNew not implemented yet"));
}


/* Bool equals(Obj? that) */
Bool File_equals(Obj self, NullableObj that)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.equals not implemented yet"));
}


/* Int hash() */
Int File_hash(Obj self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.hash not implemented yet"));
}


/* Str toStr() */
Str* File_toStr(Obj self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.toStr not implemented yet"));
}


/* DateTime? modified */
DateTime* File_modified(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.modified not implemented yet"));
}


/* DateTime? modified */
void File_setModified(File* self, DateTime* val)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.modified not implemented yet"));
}


/* Str sep */
Str* File_sep(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.sep not implemented yet"));
}


/* Str pathSep */
Str* File_pathSep(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.pathSep not implemented yet"));
}


/* File make(Uri uri, Bool checkSlash) */
File* File_make_1(Uri* uri)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.make not implemented yet"));
}


/* File make(Uri uri, Bool checkSlash) */
File* File_make(Uri* uri, Bool checkSlash)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.make not implemented yet"));
}


/* File os(Str osPath) */
File* File_os(Str* osPath)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.os not implemented yet"));
}


/* File[] osRoots() */
List* File_osRoots(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.osRoots not implemented yet"));
}


/* File createTemp(Str prefix, Str suffix, File? dir) */
File* File_createTemp_0(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.createTemp not implemented yet"));
}


/* File createTemp(Str prefix, Str suffix, File? dir) */
File* File_createTemp_1(Str* prefix)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.createTemp not implemented yet"));
}


/* File createTemp(Str prefix, Str suffix, File? dir) */
File* File_createTemp_2(Str* prefix, Str* suffix)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.createTemp not implemented yet"));
}


/* File createTemp(Str prefix, Str suffix, File? dir) */
File* File_createTemp(Str* prefix, Str* suffix, File* dir)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.createTemp not implemented yet"));
}


/* Uri uri() */
Uri* File_uri(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.uri not implemented yet"));
}


/* Bool isDir() */
Bool File_isDir(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.isDir not implemented yet"));
}


/* Str[] path() */
List* File_path(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.path not implemented yet"));
}


/* Str pathStr() */
Str* File_pathStr(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.pathStr not implemented yet"));
}


/* Str name() */
Str* File_name(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.name not implemented yet"));
}


/* Str basename() */
Str* File_basename(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.basename not implemented yet"));
}


/* Str? ext() */
Str* File_ext(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.ext not implemented yet"));
}


/* MimeType? mimeType() */
MimeType* File_mimeType(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.mimeType not implemented yet"));
}


/* Bool exists() */
Bool File_exists(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.exists not implemented yet"));
}


/* Int? size() */
NullableInt File_size(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.size not implemented yet"));
}


/* Str? osPath() */
Str* File_osPath(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.osPath not implemented yet"));
}


/* File? parent() */
File* File_parent(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.parent not implemented yet"));
}


/* File[] list() */
List* File_list(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.list not implemented yet"));
}


/* File[] listDirs() */
List* File_listDirs(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.listDirs not implemented yet"));
}


/* File[] listFiles() */
List* File_listFiles(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.listFiles not implemented yet"));
}


/* Void walk(|File->Void| c) */
void File_walk(File* self, Func* c)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.walk not implemented yet"));
}


/* File normalize() */
File* File_normalize(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.normalize not implemented yet"));
}


/* File plus(Uri path, Bool checkSlash) */
File* File_plus_1(File* self, Uri* path)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.plus not implemented yet"));
}


/* File plus(Uri path, Bool checkSlash) */
File* File_plus(File* self, Uri* path, Bool checkSlash)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.plus not implemented yet"));
}


/* File create() */
File* File_create(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.create not implemented yet"));
}


/* File createFile(Str name) */
File* File_createFile(File* self, Str* name)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.createFile not implemented yet"));
}


/* File createDir(Str name) */
File* File_createDir(File* self, Str* name)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.createDir not implemented yet"));
}


/* File copyTo(File to, [Str:Obj]? options) */
File* File_copyTo_1(File* self, File* to)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.copyTo not implemented yet"));
}


/* File copyTo(File to, [Str:Obj]? options) */
File* File_copyTo(File* self, File* to, Map* options)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.copyTo not implemented yet"));
}


/* File copyInto(File dir, [Str:Obj]? options) */
File* File_copyInto_1(File* self, File* dir)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.copyInto not implemented yet"));
}


/* File copyInto(File dir, [Str:Obj]? options) */
File* File_copyInto(File* self, File* dir, Map* options)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.copyInto not implemented yet"));
}


/* File moveTo(File to) */
File* File_moveTo(File* self, File* to)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.moveTo not implemented yet"));
}


/* File moveInto(File dir) */
File* File_moveInto(File* self, File* dir)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.moveInto not implemented yet"));
}


/* File rename(Str newName) */
File* File_rename(File* self, Str* newName)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.rename not implemented yet"));
}


/* Void delete() */
void File_delete(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.delete not implemented yet"));
}


/* File deleteOnExit() */
File* File_deleteOnExit(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.deleteOnExit not implemented yet"));
}


/* Buf open(Str mode) */
Buf* File_open_0(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.open not implemented yet"));
}


/* Buf open(Str mode) */
Buf* File_open(File* self, Str* mode)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.open not implemented yet"));
}


/* Buf mmap(Str mode, Int pos, Int? size) */
Buf* File_mmap_0(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.mmap not implemented yet"));
}


/* Buf mmap(Str mode, Int pos, Int? size) */
Buf* File_mmap_1(File* self, Str* mode)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.mmap not implemented yet"));
}


/* Buf mmap(Str mode, Int pos, Int? size) */
Buf* File_mmap_2(File* self, Str* mode, Int pos)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.mmap not implemented yet"));
}


/* Buf mmap(Str mode, Int pos, Int? size) */
Buf* File_mmap(File* self, Str* mode, Int pos, NullableInt size)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.mmap not implemented yet"));
}


/* InStream in(Int? bufferSize) */
InStream* File_in_0(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.in not implemented yet"));
}


/* InStream in(Int? bufferSize) */
InStream* File_in(File* self, NullableInt bufferSize)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.in not implemented yet"));
}


/* OutStream out(Bool append, Int? bufferSize) */
OutStream* File_out_0(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.out not implemented yet"));
}


/* OutStream out(Bool append, Int? bufferSize) */
OutStream* File_out_1(File* self, Bool append)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.out not implemented yet"));
}


/* OutStream out(Bool append, Int? bufferSize) */
OutStream* File_out(File* self, Bool append, NullableInt bufferSize)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.out not implemented yet"));
}


/* Buf readAllBuf() */
Buf* File_readAllBuf(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.readAllBuf not implemented yet"));
}


/* Str[] readAllLines() */
List* File_readAllLines(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.readAllLines not implemented yet"));
}


/* Void eachLine(|Str->Void| f) */
void File_eachLine(File* self, Func* f)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.eachLine not implemented yet"));
}


/* Str readAllStr(Bool normalizeNewlines) */
Str* File_readAllStr_0(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.readAllStr not implemented yet"));
}


/* Str readAllStr(Bool normalizeNewlines) */
Str* File_readAllStr(File* self, Bool normalizeNewlines)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.readAllStr not implemented yet"));
}


/* [Str:Str] readProps() */
Map* File_readProps(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.readProps not implemented yet"));
}


/* Void writeProps([Str:Str] props) */
void File_writeProps(File* self, Map* props)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.writeProps not implemented yet"));
}


/* Obj? readObj([Str:Obj]? options) */
NullableObj File_readObj_0(File* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.readObj not implemented yet"));
}


/* Obj? readObj([Str:Obj]? options) */
NullableObj File_readObj(File* self, Map* options)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.readObj not implemented yet"));
}


/* Void writeObj(Obj? obj, [Str:Obj]? options) */
void File_writeObj_1(File* self, NullableObj obj)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.writeObj not implemented yet"));
}


/* Void writeObj(Obj? obj, [Str:Obj]? options) */
void File_writeObj(File* self, NullableObj obj, Map* options)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::File.writeObj not implemented yet"));
}


/**********************************************
 *
 * Type-system functions
 *
 **********************************************/


Type* File_initType(void)
{
  if (File_classType == NULL)
  {
    Type* baseType = Obj_initType();
    VTable* vtable = File_initVTable();
    Type* type = Type_new("File", baseType, vtable, sizeof(File), sizeof(FileVTable));
    Type_registerCtorImplementation(type, "makeNew", File_makeNew, 1);
    Type_registerMethodImplementation(type, "basename", File_basename, 0);
    Type_registerMethodImplementation(type, "copyInto", File_copyInto_1, 1);
    Type_registerMethodImplementation(type, "copyInto", File_copyInto, 2);
    Type_registerMethodImplementation(type, "copyTo", File_copyTo_1, 1);
    Type_registerMethodImplementation(type, "copyTo", File_copyTo, 2);
    Type_registerMethodImplementation(type, "create", File_create, 0);
    Type_registerMethodImplementation(type, "createDir", File_createDir, 1);
    Type_registerMethodImplementation(type, "createFile", File_createFile, 1);
    Type_registerMethodImplementation(type, "createTemp", File_createTemp_0, 0);
    Type_registerMethodImplementation(type, "createTemp", File_createTemp_1, 1);
    Type_registerMethodImplementation(type, "createTemp", File_createTemp_2, 2);
    Type_registerMethodImplementation(type, "createTemp", File_createTemp, 3);
    Type_registerMethodImplementation(type, "delete", File_delete, 0);
    Type_registerMethodImplementation(type, "deleteOnExit", File_deleteOnExit, 0);
    Type_registerMethodImplementation(type, "eachLine", File_eachLine, 1);
    Type_registerMethodImplementation(type, "equals", File_equals, 1);
    Type_registerMethodImplementation(type, "exists", File_exists, 0);
    Type_registerMethodImplementation(type, "ext", File_ext, 0);
    Type_registerMethodImplementation(type, "hash", File_hash, 0);
    Type_registerMethodImplementation(type, "in", File_in_0, 0);
    Type_registerMethodImplementation(type, "in", File_in, 1);
    Type_registerMethodImplementation(type, "isDir", File_isDir, 0);
    Type_registerMethodImplementation(type, "list", File_list, 0);
    Type_registerMethodImplementation(type, "listDirs", File_listDirs, 0);
    Type_registerMethodImplementation(type, "listFiles", File_listFiles, 0);
    Type_registerMethodImplementation(type, "make", File_make_1, 1);
    Type_registerMethodImplementation(type, "make", File_make, 2);
    Type_registerMethodImplementation(type, "mimeType", File_mimeType, 0);
    Type_registerMethodImplementation(type, "mmap", File_mmap_0, 0);
    Type_registerMethodImplementation(type, "mmap", File_mmap_1, 1);
    Type_registerMethodImplementation(type, "mmap", File_mmap_2, 2);
    Type_registerMethodImplementation(type, "mmap", File_mmap, 3);
    Type_registerMethodImplementation(type, "moveInto", File_moveInto, 1);
    Type_registerMethodImplementation(type, "moveTo", File_moveTo, 1);
    Type_registerMethodImplementation(type, "name", File_name, 0);
    Type_registerMethodImplementation(type, "normalize", File_normalize, 0);
    Type_registerMethodImplementation(type, "open", File_open_0, 0);
    Type_registerMethodImplementation(type, "open", File_open, 1);
    Type_registerMethodImplementation(type, "os", File_os, 1);
    Type_registerMethodImplementation(type, "osPath", File_osPath, 0);
    Type_registerMethodImplementation(type, "osRoots", File_osRoots, 0);
    Type_registerMethodImplementation(type, "out", File_out_0, 0);
    Type_registerMethodImplementation(type, "out", File_out_1, 1);
    Type_registerMethodImplementation(type, "out", File_out, 2);
    Type_registerMethodImplementation(type, "parent", File_parent, 0);
    Type_registerMethodImplementation(type, "path", File_path, 0);
    Type_registerMethodImplementation(type, "pathStr", File_pathStr, 0);
    Type_registerMethodImplementation(type, "plus", File_plus_1, 1);
    Type_registerMethodImplementation(type, "plus", File_plus, 2);
    Type_registerMethodImplementation(type, "readAllBuf", File_readAllBuf, 0);
    Type_registerMethodImplementation(type, "readAllLines", File_readAllLines, 0);
    Type_registerMethodImplementation(type, "readAllStr", File_readAllStr_0, 0);
    Type_registerMethodImplementation(type, "readAllStr", File_readAllStr, 1);
    Type_registerMethodImplementation(type, "readObj", File_readObj_0, 0);
    Type_registerMethodImplementation(type, "readObj", File_readObj, 1);
    Type_registerMethodImplementation(type, "readProps", File_readProps, 0);
    Type_registerMethodImplementation(type, "rename", File_rename, 1);
    Type_registerMethodImplementation(type, "size", File_size, 0);
    Type_registerMethodImplementation(type, "toStr", File_toStr, 0);
    Type_registerMethodImplementation(type, "uri", File_uri, 0);
    Type_registerMethodImplementation(type, "walk", File_walk, 1);
    Type_registerMethodImplementation(type, "writeObj", File_writeObj_1, 1);
    Type_registerMethodImplementation(type, "writeObj", File_writeObj, 2);
    Type_registerMethodImplementation(type, "writeProps", File_writeProps, 1);
    Type_registerFieldImplementation(type, "modified", File_modified, File_setModified);
    Type_registerFieldImplementation(type, "pathSep", File_pathSep, NULL);
    Type_registerFieldImplementation(type, "sep", File_sep, NULL);
    File_classType = type;
    File_initStatic();
  }
  return File_classType;
}


VTable* File_initVTable(void)
{
  if (File_classVTable == NULL)
  {
    VTable* vtable = memoryAlloc(sizeof(FileVTable));
    memcpy(vtable, Obj_initVTable(), sizeof(FanObjVTable));
    ((FanObjVTable*)vtable)->equals = File_equals;
    ((FanObjVTable*)vtable)->hash = File_hash;
    ((FanObjVTable*)vtable)->toStr = File_toStr;
    ((FileVTable*)vtable)->copyInto_1 = File_copyInto_1;
    ((FileVTable*)vtable)->copyInto = File_copyInto;
    ((FileVTable*)vtable)->copyTo_1 = File_copyTo_1;
    ((FileVTable*)vtable)->copyTo = File_copyTo;
    ((FileVTable*)vtable)->create = File_create;
    ((FileVTable*)vtable)->delete = File_delete;
    ((FileVTable*)vtable)->deleteOnExit = File_deleteOnExit;
    ((FileVTable*)vtable)->exists = File_exists;
    ((FileVTable*)vtable)->in_0 = File_in_0;
    ((FileVTable*)vtable)->in = File_in;
    ((FileVTable*)vtable)->list = File_list;
    ((FileVTable*)vtable)->listDirs = File_listDirs;
    ((FileVTable*)vtable)->listFiles = File_listFiles;
    ((FileVTable*)vtable)->mmap_0 = File_mmap_0;
    ((FileVTable*)vtable)->mmap_1 = File_mmap_1;
    ((FileVTable*)vtable)->mmap_2 = File_mmap_2;
    ((FileVTable*)vtable)->mmap = File_mmap;
    ((FileVTable*)vtable)->modified = File_modified;
    ((FileVTable*)vtable)->setModified = File_setModified;
    ((FileVTable*)vtable)->moveInto = File_moveInto;
    ((FileVTable*)vtable)->moveTo = File_moveTo;
    ((FileVTable*)vtable)->normalize = File_normalize;
    ((FileVTable*)vtable)->open_0 = File_open_0;
    ((FileVTable*)vtable)->open = File_open;
    ((FileVTable*)vtable)->osPath = File_osPath;
    ((FileVTable*)vtable)->out_0 = File_out_0;
    ((FileVTable*)vtable)->out_1 = File_out_1;
    ((FileVTable*)vtable)->out = File_out;
    ((FileVTable*)vtable)->parent = File_parent;
    ((FileVTable*)vtable)->plus_1 = File_plus_1;
    ((FileVTable*)vtable)->plus = File_plus;
    ((FileVTable*)vtable)->rename = File_rename;
    ((FileVTable*)vtable)->size = File_size;
    ((FileVTable*)vtable)->walk = File_walk;
    File_classVTable = vtable;
  }
  return File_classVTable;
}


void File_initStatic(void)
{
}
